/*
 * @Author: fengYM feng25321@163.com
 * @Date: 2023-09-25 10:34:18
 * @LastEditors: fengYM feng25321@163.com
 * @LastEditTime: 2023-10-12 16:18:27
 * @Description:
 */
import { defineStore } from "pinia";

export const useStore = defineStore("counter", {
  state: () => ({
    newsInfo: null,
    orderType: {
      ["WAIT_PAY"]: "待付款",
      ["PAY_SUCCESS"]: "待发货",
      ["IN_DISTRIBUTION"]: "待收货",
      ["RETURN"]: "退款/售后",
      ["CONFIRM_RECEIPT"]: "已完成",
      ["CANCELED"]: "已取消",
      ["RETURNING"]: "退款中",
      ["RETURNED"]: "已退款",
      ["EVALUATEED"]: "已评价",
      ["DELETE"]: "已删除",
    },
    payType: {
      ["0"]: "余额支付",
      ["1"]: "微信支付",
      ["2"]: "支付宝支付",
      ["3"]: "银行卡支付",
      ["4"]: "其他支付",
    },
    userLevelInfo: {
      ["0"]: "普通用户",
      ["1"]: "小朵",
      ["2"]: "大朵",
      ["3"]: "合伙人",
      ["4"]: "顾问",
    },
    goodsInfo: null,
    payInfo: null,
    WalInfo: null,
  }),
  actions: {
    setNewsInfo(data: any) {
      this.newsInfo = data;
    },
    setGoodsInfo(data: any) {
      this.goodsInfo = data;
    },
    setPayInfo(data: any) {
      this.payInfo = data as any;
    },
    setWalInfo(data: any) {
      this.WalInfo = data as any;
    },
  },
});
